Embodiments of the present invention relate to a detection of a rotational position of a shaft, in particular to a detection of a variation of rotation angle of the shaft. The shaft may be located inside a housing. The shaft may in particular be a cam shaft of an engine.